<div class="admin">
    <div class="tab panel dux-box admin-panel">
        <div class="panel-head"><strong>会员管理</strong></div>
        <div class="fixed-empty"></div>
        <form method="get" action="{:U('index')}" name="formSearch" id="formSearch">
        <table class="table tb-type2">
            <tbody>
                <tr>
                    <td width="6%"><label style="font-weight: bold;">用户名：</label></td>
                    <td width="10%"><input class="input input_big" type="text" name="user_name" value="" /></td>
                    <td width="7%"><label style="font-weight: bold;">注册时间：</label></td>
                    <td width="10%"><input class="input input_big hasDatepicker" type="text" value="" id="query_start_time" name="query_start_time" readonly="readonly"></td>
                    <td width="2%"><label style="font-weight: bold;">至</label></td>
                    <td width="10%"><input class="input input_big hasDatepicker" type="text" value="" id="query_end_time" name="query_end_time" readonly="readonly"></td>
                    <td width="5%"><label style="font-weight: bold;">排序：</label></td>
                    <td width="5%">
                        <select name="order" class="querySelect">
                            <option value="0" <if condition='$orderSerach eq 0'> selected="selected"</if>>注册时间</option>
                            <option value="1" <if condition='$orderSerach eq 1'> selected="selected"</if>>订单数量</option>
                            <option value="2" <if condition='$orderSerach eq 2'> selected="selected"</if>>消费金额</option>
                            <option value="3" <if condition='$orderSerach eq 3'> selected="selected"</if>>登陆次数</option>
                        </select>
                    </td>
                    <td width="10%"><button class="button bg-blue" type="submit">查询</button></td>
                    <td width="*"></td>
                </tr>
            </tbody>
        </table>
        </form>
        <form method="get" action="{:U('Excel/expOrderExcel')}" name="formSearch" id="formSearch">
            <table class="table tb-type2">
                <tr>
                    <td>
                        <div style="text-align:right;">
                            <input  class="button bg-main" type="submit" value="导出Excel" />
                        </div>
                    </td>
                </tr>
            </table>
        </form>

        <table class="table tb-type2 nobdb">
            <thead>
                <tr class="thead">
                    <th>编号</th>
                    <th>类型</th>
                    <th>会员</th>
                    <th>性别</th>
                    <th>消费</th>
                    <th>单数</th>
                    <th>手机号</th>
                    <th>来源</th>
                    <th>登陆次数</th>
                    <th>注册时间</th>
                    <th>操作</th>
                </tr>
            </thead>
            <tbody>
            <foreach item="v" name="list">
                <tr class="hover">
                    <td>{$v['user_id']}</td>
                    <td>
                <if condition="$v['user_group_id'] eq 2">
                    <span class="button bg-blue">商家</span>
                    <else />
                    <span class="button bg-green">用户</span>
                </if>
                </td>
                <td>{$v['user_name']}</td>
                <td>
                    <switch name="v.user_sex">
                <case value="1">男</case>
                <case value="2">女</case>
                <default />保密
                </switch>
                </td>
                <td>{$v['user_points']|price}</td>
                <td>{$v['user_orders']}</td>
                <td>{$v['user_mobile']}</td>
                <td class="nowrap align-center">
                    <switch name="v.user_from">
                <case value="1">手机</case>
                <case value="2">微信</case>
                <default />PC
                </switch>
                </td>
                <td class="nowrap align-center">{$v['user_login_num']}</td>
                <td>{$v['user_time']|date='Y-m-d H:i:s',###}</td>
                <td class="w144 align-center">
                    <a class="button bg-red button-little" href="{:U('deleteuser',array('user_id'=>$v['user_id']))}"><i class="icon-minus-circle"></i>禁用</a>
                    <a class="button bg-red button-little js-del" href="{:U('deleteuser',array('user_id'=>$v['user_id']))}"><i class="icon-minus-circle"></i>删除</a>
                    <a class="button bg-green button-little" href="{:U('details',array('user_id'=>$v['user_id']))}" target="_blank" title="预览"><i class="icon-eye"></i>详情</a>
                    <!-- 删除 -->
                </td>
                </tr>
            </foreach>

            </tbody>
            <tfoot class="panel-foot">
                <tr>
                    <td colspan="15"><div class="pages clearfix">{$pages}</div></td>
                </tr>
            </tfoot>
        </table>
    </div>
</div>
<script type="text/javascript">
    $('#myform').layer({
        actionUrl: "batchAction",
        deleteUrl: "del",
    });
    $('#query_start_time').duxTime({
        timepicker: false,
    });
    $('#query_end_time').duxTime({
        timepicker: false,
    });
</script>